import lzma

# 压缩数据
with open ("./uploads/9j4AAQSkZ.jpeg",'br') as f:data=f.read()
compressed_data = lzma.compress(data)

# 解压数据
decompressed_data = lzma.decompress(compressed_data)

print(len(data),len(compressed_data))